package cn.edu.sjtu.software.sjtucontacts.activity;

import java.util.ArrayList;
import java.util.List;

import cn.edu.sjtu.software.sjtucontacts.model.Contact;

import android.app.Activity;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

public class ContactItemListAdapter extends BaseAdapter{

	private List<View> items;
	
	public ContactItemListAdapter(Activity activity, Context context, List<View> itemList){
		if(itemList!=null)
			this.items = itemList;
		else items = new ArrayList<View>();
	}
	
	@Override
	public int getCount() {
		return items.size();
	}

	@Override
	public Object getItem(int arg0) {
		return items.get(arg0);
	}

	@Override
	public long getItemId(int arg0) {
		return arg0;
	}

	@Override
	public View getView(int arg0, View arg1, ViewGroup arg2) {
		View item = items.get(arg0);
		return item;
	}

}
